/**
 * ****************************************************************************
 * Project: RoboBridge
 * ----------------------------------------------------------------------------
 * -------------------------- [c]2012 - KrawallMann ---------------------------
 * ---------------------- http://www.krawallmann.de.tc/ -----------------------
 * ****************************************************************************
 * File: Program.java Package: tc.de.krawallmann.robobridge Version: 1.0
 * Author(s): KrawallMann
 * ****************************************************************************
 * Description:
 * ****************************************************************************
 */
package tc.de.krawallmann.robobridge;

import tc.de.krawallmann.robobridge.communication.AbstractRemoteCommunicationDevice;

/**
 * The Interface Program describes a program's basic structure. Implement it as
 * you want!
 * 
 * @author KrawallMann
 * @version 1.0
 */
public interface Program {

	/**
	 * Close.
	 */
	void close();

	/**
	 * Use this method to initialize your program. Do not use remote functions
	 * here!
	 * 
	 * @param bridge
	 *            the bridge
	 */
	void init(RoboBridge<? extends AbstractRemoteCommunicationDevice> bridge);

	/**
	 * Checks if is termination requested.
	 * 
	 * @return true, if is termination requested
	 */
	boolean isTerminationRequested();

	/**
	 * Called before the first loop. You can use all functions here!
	 */
	void onFirstLoop();

	/**
	 * Update.
	 */
	void update();
}
